home *** CD-ROM | disk | FTP | other *** search
- //This sample main program may be used to test Visual C++ code generation scripts.
- //In With Class load cppcar.omt. Run the scripts vc15head.sct and vc15func.sct
- //with a QuickWin project. Add to the project vc15main.cpp, vehicle.cpp,
- //car.cpp, motor.cpp, passenge.cpp, tire.cpp, and cellular.cpp.
- //Comments and suggestions are solicited Richard Felsinger, RCF Associates
- //960 Scottland Dr, Mt Pleasant, SC 29464 tele 803-881-3648 71162.755@compuserve.com
-
- #include <iostream.h>
- #include "stdafx.h"
- #include "car.h"
-
- int main ()
- {
- Car car1; //Creates car1 object without a passenger
- cin >> car1; //Invokes insertion operator>>
- cout << car1; //Invokes extraction operator<<
-
- Car car2 (55, 10); //Invokes constructor with arguments
-
- car1 = car2; //Invokes assignment operator=
- if (car1 == car2) cout << "Cars are equal.";//Invokes equality operator==
- else cout << "Cars are not equal.";
-
- return 0;
- }
-